<?php

// 广告位表

namespace app\console\model;

use think\Model;
use think\Request;
use app\common\trilateral\Classify as ClassifyAlias;
use think\Session;
use think\Hook;

class NewsType extends Model
{
    // 模型事件
    protected static function init()
    {


        self::event('before_write', function ($data) {
            //auding($data);
        });
    }

    protected function base($query)
    {
        $query->where('is_delete',1);
    }

    public function getAudingTextAttr($value, $data)
    {
        $status = [1 => '等待审核', 2 => '审核成功', 3 => '审核失败'];
        return $status[$data['auding_status']];
    }

}